<?php
/**
 * IG_Config
 *
 * @author mmxie
 * @copyright Copyright (c) 2009 Green Shore (http://www.iwgame.com)
 * @version $Id: Config.php 929 2011-10-27 07:52:50Z mmxie $
 */
class IG_Config
{
    static public function convArray($config)
    {
        if (!is_array($config)) {
            /*
             * Convert Zend_Config argument to a plain array.
             */
            if ($config instanceof Zend_Config) {
                $config = $config->toArray();
            } else {
                throw new IG_Exception('Adapter parameters must be in an array or a Zend_Config object');
            }
        }

        return $config;
    }
}